package com.ym.medical.enums;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.StdConverter;
import com.ym.common.annotations.EnumDescription;
import com.ym.common.constant.DictEnum;

@EnumDescription("医生服务项")
public enum DoctorServiceItemEnum implements DictEnum {

	//--------------------start-----------------

	/**
	 * 图文问诊
	 */
	BY_INQUIRING("01","图文问诊"),
	/**
	 * 电话问诊
	 */
	CALL_PHYSICIAN_VISITS("02","电话问诊"),

	/**
	 * 私人医生
	 */
	PRIVATE_DOCTORS("03","私人医生"),

	/**
	 * 视频问诊
	 */
	CALL_VIDEO_VISITS("04","视频问诊"),


	//--------------------end-------------------
	;

	private String key;

	private String value;

	DoctorServiceItemEnum(String key, String value) {
		this.key = key;
		this.value = value;
	}

	@Override
	public String getKey() {
		return this.key;
	}

	@Override
	public String getValue() {
		return this.value;
	}


	/**
	 * 序列化使用
	 */
	public static class Covert extends StdConverter<String, JSONObject> {
		@Override
		public JSONObject convert(String value) {
			return DictEnum.valueOfJson(DoctorServiceItemEnum.class, value);
		}
	}
}
